<?php


require_once("inc.member.php");





$this_title=__("Annoucement & News");


$page_title=__("Annoucement & News");


$content_title=__("Annoucement & News");





$item_per_page=$vars["user_item_per_page"];








//#####LIST EWALLET HISTORY#####


$count_sql="select count(*) from $db->news where status='active'";

if($_SESSION['lan']=='cn')
	$record_sql="select f_title_cn as f_title, f_content_cn as f_content, f_date from $db->news where f_status='active' order by f_date desc, f_id desc limit <%limit_start%>, <%limit%>";
else
	$record_sql="select f_title, f_content, f_date from $db->news where f_status='active' order by f_date desc, f_id desc limit <%limit_start%>, <%limit%>";


$cur_page=$_GET["nav"];


$total_record=@mysql_result(mysql_query($count_sql), 0);


$total_page=ceil($total_record/$item_per_page);


$page=($cur_page? ($cur_page>$total_page? $total_page : ($cur_page<1? 1 : $cur_page)) : 1);


$limit_start=($page-1)*$item_per_page;


$nav_link=format_page($page, $total_page, 15);


$this_page_total=@mysql_num_rows($r=mysql_query(str_replace("<%limit_start%>", $limit_start, str_replace("<%limit%>", $item_per_page, $record_sql))));


$k=0;


for($i=0;$i<$this_page_total;$i++){


 $p=mysql_fetch_assoc($r);

 

 $his_row.="


 <tr class='row$k'>


  <td><br>".$p["f_date"]."&nbsp;&nbsp;".$p["f_title"]."<br><br>".$p["f_content"]."<br><br></td>


 </tr>";


 $k=1-$k;


}







//listing


$content=


"<h2>".$this_title."</h2>


$nav_link


<table class='pbl_table'>


 $his_row


</table>


$nav_link";



print format_member_page($content, $this_title, $content_title, $css . $inc_jvscript);


?>